<template>
    <van-nav-bar title="订单页" left-text="返回" left-arrow @click-left="$router.go(-1)" />
    <van-contact-card type="add" add-text="添加地址" @click="$router.push('/address')" />
    <van-empty image="error" description="暂无订单" />
    <van-submit-bar :price="0o0" button-text="提交订单" @submit="onSubmit" />
</template>
<script lang='ts' setup>
import { useUserStore } from '@/stores/userStore';
import { getorderlist } from '@/api/orderapi';
import { Toast } from 'vant';
const userStore=useUserStore()
// 点击提交订单
const onSubmit=()=>Toast('提交订单');
// 调用全部订单的接口
getorderlist({userid:userStore.userId}).then((res:any)=>{
    console.log('全部订单',res);
})

</script>
<style lang="scss" scoped>

</style>
